package com.zggk.lzz.guide;

import android.app.Activity;

import com.zggk.lzz.api.MyApplication;
import com.zggk.lzz.api.Urls;
import com.zggk.lzz.callback.StringDialogCallback;
import com.zggk.lzz.mvp.BasePresenterImpl;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;

/**
 * MVPPlugin
 *  邮箱 784787081@qq.com
 */

public class GuidePresenter extends BasePresenterImpl<GuideContract.View> implements GuideContract.Presenter{
    @Override
    public void getUserInfo(Activity activity) {
        OkGo.<String>post(Urls.JAVASERVER + "pms/rhms/lzzapp/getuserinfo")
                .params("token", "Bearer$" + MyApplication.spUtils.getString("Token",""))
                .execute(new StringDialogCallback(activity) {
                    @Override
                    public void onSuccess(final Response<String> response) {
                        mView.getUserInfos(response.body().toString());
                    }
                });
    }
}
